1. Field of the Invention
The present invention relates to an apparatus for processing image data, a method of processing image data and a computer-readable medium.
2. Description of the Related Art
Color keying has seen widespread use in the video industry. In this process, talent is shot against a blue background. The blue background provides a key that is used to control a mixing process in which the foreground image is mixed with a background image. The result is that the talent appears to be in the environment of the background image.
Historical implementations of this technique have used analogue circuitry for the detection of the blue key, and in the mixing process. Early on, it was realised that a simple switch between foreground and background results in considerable distortion being visible at the edges of the foreground image. Practical techniques for defining a level of smooth variation from background to foreground were developed, still in the analogue domain, and which were found to be reasonably effective within the constraints of low-quality video.
With the advent of digital processing of image data, the possibility of controlling the gradual switch between foreground and background more accurately has attracted many highly technical solutions. In particular, the key color is defined by a volume in a color space. A tolerance volume encloses the background color, and this volume is itself enclosed by a softness volume. Any pixels whose color lies outside the softness volume are considered as belonging to the foreground. Intermediate regions, inside the softness volume but outside the tolerance volume, define a partial level of mixing between the foreground and background images.
This abstraction of the problem of color keying enables the computer programmer to define solutions of considerable flexibility. In one known system, the color volumes are defined by irregular polyhedrons having many dozens of sides. Unfortunately this level of complexity, while theoretically providing a solution to almost any keying problem, makes the task of the user impossibly difficult. Simpler solutions, on the other hand, fail to provide the level of quality that is required in today""s digital film editing suites, where absolute realism is the intended aim.
According to an aspect of the present invention, there is provided apparatus for processing image data, comprising storage means for storing instructions, memory means for storing said instructions during execution and image data including foreground image data, processing means for performing image processing in which said foreground image data may be analysed to generate matte values for controlling a keying process in which said foreground image is to be composited against background image data, and monitoring means for facilitating user interaction with said image processing, wherein said processing means is configured such that, in response to said instructions, said image data is processed by the steps of: receiving a user indication of a background color, said indication defining a color diamond in a plane of constant luminance, and a luminance range; defining a transformation in response to said user indication; and processing pixels of said foreground image with said transformation in order to identify a matte value.